//
//  SimpleModal.m
//  SimpleLogIn
//
//  Created by dllo on 16/5/11.
//  Copyright © 2016年 jcl. All rights reserved.
//

#import "SimpleModal.h"

@interface SimpleModal ()

@end

@implementation SimpleModal

- (void)viewDidLoad {
    [super viewDidLoad];
   
    [self createModal];
    [self navigationItemOf];
    
    
}

- (void)createModal {
    
     UITextField *textOfUser = [[UITextField alloc]initWithFrame:CGRectMake(100, 100, 130, 40)];
    
    textOfUser.placeholder = @"请输入用户名";
    
    [self.view addSubview:textOfUser];
    
    [textOfUser release];
    
    UITextField *textOfPassword = [[UITextField alloc]initWithFrame:CGRectMake(100, 160, 130, 40)];
    
    textOfPassword.placeholder = @"请输入密码";
    
    [self.view addSubview:textOfPassword];
    
    [textOfPassword release];
    
    
    UITextField *textOfPasswordAgain = [[UITextField alloc]initWithFrame:CGRectMake(100, 220, 130, 40)];
    
    textOfPasswordAgain.placeholder = @"请再确认密码";
    
    [self.view addSubview:textOfPasswordAgain];
    
    [textOfPasswordAgain release];

    
    UIButton *buttonBack = [[UIButton alloc]initWithFrame:CGRectMake(150, 400, 60, 40)];
    
    [buttonBack setTitle:@"返回" forState:UIControlStateNormal];
    
    [self.view addSubview:buttonBack];
    
    buttonBack.backgroundColor = [UIColor blueColor];
    
    [buttonBack addTarget:self action:@selector(handleBack:) forControlEvents:UIControlEventTouchUpInside];
    
 
    
}

- (void)handleBack:(UIButton *)back {
    
    [self.navigationController popToViewController:self.navigationController.viewControllers[1] animated:YES];
    
    
}





- (void)navigationItemOf {

    self.navigationItem.title = @"注册";
    self.view.backgroundColor = [UIColor cyanColor];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(handleCancel:)];
    
    
    
}


- (void)handleCancel:(UIBarButtonItem *)cancel {
    
    
    
    
    
    
}











@end
